<page-header-wrapper [title]="''"></page-header-wrapper>
<!-- 搜索表单 -->
<nz-card>
  <div nz-row nzGutter="8">
    <!-- 查询字段小于或等于3个时，不显示伸缩按钮 -->
    <div nz-col nzSpan="24" *ngIf="queryFieldCount <= 4">
      <sf
        #sf
        [schema]="schema"
        [ui]="ui"
        [mode]="'search'"
        [loading]="service.http.loading"
        (formSubmit)="search()"
        (formReset)="resetSF()"
      ></sf>
    </div>

    <!-- 查询字段大于3个时，根据展开状态调整布局 -->
    <ng-container *ngIf="queryFieldCount > 4">
      <div nz-col [nzSpan]="_$expand ? 24 : 18">
        <sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf>
      </div>
      <div nz-col [nzSpan]="_$expand ? 24 : 6" [class.text-right]="_$expand">
        <button nz-button nzType="primary" [disabled]="!sf.valid"  (click)="search()" >查询</button>
        <button nz-button (click)="resetSF()" >重置</button>
        <button nz-button nzType="link" (click)="expandToggle()">
          {{ !_$expand ? '展开' : '收起' }}
          <i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
        </button>
      </div>
    </ng-container>
  </div>
</nz-card>

<nz-card>
  <nz-tabset [nzSelectedIndex]="selectedIndex" (nzSelectChange) = "tabChange($event)">
    <nz-tab nzTitle="合伙人认领">
      <st
        #st1
        [data]="data"
        [columns]="columns1"
        [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
        [res]="{ reName: { list: 'data.records', total: 'data.total' } }"
        [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
        [loadingDelay]="500"
        [loading]="service.http.loading"
      >
      </st>
    </nz-tab>
    <nz-tab nzTitle="渠道销售认领">
      <st
        #st2
        [data]="data"
        [columns]="columns2"
        [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
        [res]="{ reName: { list: 'data.records', total: 'data.total' } }"
        [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
        [loadingDelay]="500"
        [loading]="service.http.loading"
      >
      </st>
    </nz-tab>
  </nz-tabset>
  
  
</nz-card>
